home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig09_11.jar / Ch09 / Fig09_11 / Derived.h < prev    next >
C/C++ Source or Header  |  1997-08-25  |  484b  |  24 lines

  1. // Fig. 9.11: derived.h
  2. // Definition of class Derived which inherits
  3. // multiple base classes (Base1 and Base2).
  4. #ifndef DERIVED_H
  5. #define DERIVED_H
  6.  
  7. #include "base1.h"
  8. #include "base2.h"
  9.  
  10. // multiple inheritance
  11. class Derived : public Base1, public Base2 {
  12.    friend ostream &operator<<( ostream &, const Derived & );
  13.  
  14. public:
  15.    Derived( int, char, double );
  16.    double getReal() const;
  17.  
  18. private:
  19.    double real;   // derived class's private data
  20. };
  21.  
  22. #endif
  23.  
  24.